﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Library
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void выходToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult dr = MessageBox.Show("Вы действительно хотите покинуть программу?", "Выход", MessageBoxButtons.YesNo);
            if (dr == DialogResult.No)
            {
                e.Cancel = true;
            }
        }

        private void поискКнигToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //SearchForm fm = new SearchForm();
            //fm.ShowDialog();
        }

        private void книгиToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BookBook fm = new BookBook();
            fm.ShowDialog();
        }

        private void читателиToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReaderBookForm fm = new ReaderBookForm();
            fm.ShowDialog();
        }

        private void выходToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            this.Close();
        }

        private void авторыToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AuthorsBook fm = new AuthorsBook(null);
            fm.ShowDialog();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void типыКнигToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BookTypeBook fm = new BookTypeBook();
            fm.ShowDialog();
        }

        private void выдатьПринятьКнигуToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GetReturnBookForm fm = new GetReturnBookForm();
            fm.ShowDialog();
        }
    }
}
